from django.db import models
# Create your models here.
models.objects=models.manager
class Company(models.Model):
    companyid = models.AutoField(db_column='CompanyID', primary_key=True)  # Field name made lowercase.
    companyname = models.CharField(db_column='CompanyName', max_length=255, blank=True, null=True)  # Field name made lowercase.
    companyscale = models.CharField(db_column='CompanyScale', max_length=255, blank=True, null=True)  # Field name made lowercase.
    companypicture = models.TextField(db_column='CompanyPicture', blank=True, null=True)  # Field name made lowercase.
    companyaddress = models.CharField(db_column='CompanyAddress', max_length=255, blank=True, null=True)  # Field name made lowercase.
    companydescription = models.CharField(db_column='CompanyDescription', max_length=510, blank=True, null=True)  # Field name made lowercase.
    workingstarttime = models.TimeField(db_column='WorkingStartTime', blank=True, null=True)  # Field name made lowercase.
    workingendtime = models.TimeField(db_column='WorkingEndTime', blank=True, null=True)  # Field name made lowercase.
    password = models.CharField(db_column='Password', max_length=255)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'company'


class Recruit(models.Model):
    recruitid = models.AutoField(db_column='RecruitID', primary_key=True)  # Field name made lowercase.
    recruitdescription = models.CharField(db_column='RecruitDescription', max_length=1200, blank=True, null=True)  # Field name made lowercase.
    companyid = models.ForeignKey(Company, models.DO_NOTHING, db_column='CompanyID')  # Field name made lowercase.
    recruitmin = models.IntegerField(db_column='RecruitMin', blank=True, null=True)  # Field name made lowercase.
    recruitmax = models.IntegerField(db_column='RecruitMax', blank=True, null=True)  # Field name made lowercase.
    salary = models.CharField(db_column='Salary', max_length=255)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'recruit'


class Student(models.Model):
    studentid = models.AutoField(db_column='StudentID', primary_key=True)  # Field name made lowercase.
    studentname = models.CharField(db_column='StudentName', max_length=255, blank=True, null=True)  # Field name made lowercase.
    studentadvantage = models.CharField(db_column='StudentAdvantage', max_length=255, blank=True, null=True)  # Field name made lowercase.
    studentyear = models.DateField(db_column='StudentYear', blank=True, null=True)  # Field name made lowercase.
    studentmajor = models.CharField(db_column='StudentMajor', max_length=255, blank=True, null=True)  # Field name made lowercase.
    password = models.CharField(db_column='Password', max_length=255)  # Field name made lowercase.


    class Meta:
        managed = False
        db_table = 'student'

